home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mc51bugs
/
q32744
< prev
next >
Wrap
Text File
|
1988-07-20
|
895b
|
37 lines
Q32744 Compiler Generates Protection Violation
C Compiler
5.10 | 5.10
MS-DOS | OS/2
Summary:
When you attempt to compile the following piece of code in OS/2, the
compiler will generate a protection violation.
Microsoft has confirmed this to be a problem in Version 5.10. We
are researching this problem and will post new information as it
becomes available.
The code has logic that is probably not wanted; correcting it will
allow it to compile. Currently the for loop reads as follows:
for (i = NAME_LEN-1;i = 0; i--)
when you probably meant it to read:
for (i = NAME_LEN-1;i != 0 ; i--)
More Information:
The following is a code example:
#define NAME_LEN 9
main()
{
int i;
char name[NAME_LEN];
for ( i = NAME_LEN-1; i = 0; i-- )
if (name[i] == ' ') name[i] = '\0';
}
Keywords: buglist5.10
Updated 88/07/21 03:19